/*
 * Problem: 多重部分和问题
 * Author: Yuanshun L
 * Created: 10-Dec-2021
 * Topic: 动态规划法
 */
#include<iostream>
#include<cstdio>
#include<cstring>

using namespace std;
const int maxn = 1000+5;
const int maxk = 100000 + 10;
const int inf = 10000000;
int n,K;
int a[maxn],m[maxn];

int dp[maxk]; // dp[i+1][j]: 取得价值j时i剩余的最大数量

bool solve(){
    memset(dp,-1,sizeof(dp));
    dp[0] = 0; // 注意这个初始化
    for(int i=0;i<n;i++){
        for(int j=0;j<=K;j++){
            if(dp[j]>=0)
                dp[j]= m[i];
            else if(a[i]>j || dp[j-a[i]]<=0)
                dp[j] = -1;
            else
                dp[j] = dp[j-a[i]] -1;
        }
    }

    return dp[K]>=0;
}


int main(){
    freopen("data.in","r",stdin);
    freopen("data.out","w",stdout);

    cin >> n >> K;
    for(int i=0;i<n;i++)
        cin >> a[i];
    for(int i=0;i<n;i++)
        cin >> m[i];

    if(solve())
        cout << "Yes" << endl;
    else
        cout << "No" << endl;

    return 0;
}
